<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Large Objects</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 9.1.2 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="Client Interfaces"
HREF="client-interfaces.html"><LINK
REL="PREVIOUS"
TITLE="Example Programs"
HREF="libpq-example.html"><LINK
REL="NEXT"
TITLE="Introduction"
HREF="lo-intro.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2011-12-01T22:07:59"></HEAD
><BODY
CLASS="CHAPTER"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
><A
HREF="index.html"
>PostgreSQL 9.1.2 Documentation</A
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
TITLE="Example Programs"
HREF="libpq-example.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="client-interfaces.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="20%"
ALIGN="right"
VALIGN="top"
><A
TITLE="Introduction"
HREF="lo-intro.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="LARGEOBJECTS"
></A
>Chapter 32. Large Objects</H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>32.1. <A
HREF="lo-intro.html"
>Introduction</A
></DT
><DT
>32.2. <A
HREF="lo-implementation.html"
>Implementation Features</A
></DT
><DT
>32.3. <A
HREF="lo-interfaces.html"
>Client Interfaces</A
></DT
><DD
><DL
><DT
>32.3.1. <A
HREF="lo-interfaces.html#LO-CREATE"
>Creating a Large Object</A
></DT
><DT
>32.3.2. <A
HREF="lo-interfaces.html#LO-IMPORT"
>Importing a Large Object</A
></DT
><DT
>32.3.3. <A
HREF="lo-interfaces.html#LO-EXPORT"
>Exporting a Large Object</A
></DT
><DT
>32.3.4. <A
HREF="lo-interfaces.html#LO-OPEN"
>Opening an Existing Large Object</A
></DT
><DT
>32.3.5. <A
HREF="lo-interfaces.html#LO-WRITE"
>Writing Data to a Large Object</A
></DT
><DT
>32.3.6. <A
HREF="lo-interfaces.html#LO-READ"
>Reading Data from a Large Object</A
></DT
><DT
>32.3.7. <A
HREF="lo-interfaces.html#LO-SEEK"
>Seeking in a Large Object</A
></DT
><DT
>32.3.8. <A
HREF="lo-interfaces.html#LO-TELL"
>Obtaining the Seek Position of a Large Object</A
></DT
><DT
>32.3.9. <A
HREF="lo-interfaces.html#LO-TRUNCATE"
>Truncating a Large Object</A
></DT
><DT
>32.3.10. <A
HREF="lo-interfaces.html#LO-CLOSE"
>Closing a Large Object Descriptor</A
></DT
><DT
>32.3.11. <A
HREF="lo-interfaces.html#LO-UNLINK"
>Removing a Large Object</A
></DT
></DL
></DD
><DT
>32.4. <A
HREF="lo-funcs.html"
>Server-side Functions</A
></DT
><DT
>32.5. <A
HREF="lo-examplesect.html"
>Example Program</A
></DT
></DL
></DIV
><P
>    <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> has a <I
CLASS="FIRSTTERM"
>large object</I
>
    facility, which provides stream-style access to user data that is stored
    in a special large-object structure.  Streaming access is useful
    when working with data values that are too large to manipulate
    conveniently as a whole.
   </P
><P
>    This chapter describes the implementation and the programming and
    query language interfaces to <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>
    large object data.  We use the <SPAN
CLASS="APPLICATION"
>libpq</SPAN
> C
    library for the examples in this chapter, but most programming
    interfaces native to <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> support
    equivalent functionality.  Other interfaces might use the large
    object interface internally to provide generic support for large
    values.  This is not described here.
   </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="libpq-example.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="lo-intro.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Example Programs</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="client-interfaces.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Introduction</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>